package com.toplabs.unashu.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.toplabs.unashu.annotation.CreateTime;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 登录日志实体类
 * </p>
 *
 * @author ityanger
 * @since 2020-08-23
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class LoginLog implements Serializable {
    private static final long serialVersionUID = -4497767944789636756L;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long id; // id

    @CreateTime
    private Date loginTime; // 登录时间

    private String location; // 登录地点

    private String ip; // IP地址

    private String userSystem; // 操作系统

    private String userBrowser;  // 浏览器
}
